﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Baosight.ZNH.ZMCommon;
using Baosight.Platform.Core.ServiceModel;
using Baosight.Platform.Core;
using Baosight.ZNH.ZMCommon.ChildWindows;

namespace Baosight.ZNH.ZMCA.UI.PopWindows
{
    public partial class ProducePlanMonthDetailView : EFViewCmes
    {
        public ProducePlanMonthDetailView()
        {
            InitializeComponent();
        }

        public void LoadData(int year, int month, string planType)
        {
            EIInfo eiInfo = new EIInfo();
            eiInfo.Set("service", "ZMCA03");
            eiInfo.Set("method", "queryProducePlanDetail");
            eiInfo.Set("fdYear", year);
            eiInfo.Set("fdMonth", month);
            eiInfo.Set("fdPlanType", planType);
            this.Submit(eiInfo, loadDataCompleted);

        }

        private void loadDataCompleted(object sender, DoWorkCompletedEventArgs e)
        {
            this.UpdateData(e.EIInfo);
        }

        private void CancelClick(object sender, RoutedEventArgs e)
        {
            CmesWindows _window = this.Parent as CmesWindows;
            _window.DialogResult = false;
            _window.Close();
        }
    }
}
